﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace CXJ.Interface
{
    public enum OperateMode
    {
        Insert = 0,
        Update,
        Delete,
        Select,
    }

    public interface IDataOperater
    {
        IBaseEntity BaseEntity { get; set; }
        Object ErrMsg { get; set; }

        DataSet Select();
        DataSet Select(IBaseEntity entity);
        bool Operate(IBaseEntity entity, OperateMode operateMode);
        bool TranceOperate(Dictionary<OperateMode, IBaseEntity[]> lists);
        IDataParameter[] CreateParameter(IBaseEntity entity, OperateMode operateMode);

        List<IBaseEntity> GetEntityList();
        List<IBaseEntity> GetEntityList(IBaseEntity entity);
    }
}
